<template>
  <div class="hot">
    <div class="icon"></div>
    <div class="fontz">更新日期：{{timer.trackUpdateTime|formatDate}}</div>
  </div>
</template>

<script>
export default {
  props:["timer"],
  filters:{
    formatDate(value){
      let d=new Date(value);
      let month=(d.getMonth()+1);
      return (month<10?"0"+month:month)+"月"+d.getDate()+"日";
    }
  }
};
</script>

<style scoped lang="less">
.hot {
  width: 100%;
  height: 160px;
  background:url("../assets/hot.jpg");
  background-size: 100% 160px;
  position: relative;
  left: 0;
  top: 2px;
  .icon {
    background: url("../assets/icon.png") no-repeat -48px -60px;
    width: 283px;
    height: 133px;
    position: absolute;
    transform: scale(0.5);
    top: -20px;
    left: -50px;
  }
  .fontz {
    color: white;
    position: absolute;
    font-size: 12px;
    left: 20px;
    top: 90px;
  }
}
</style>